package mypro2;

class Point {
	double x, y, z;
	public Point(double _x, double _y, double _z) {
		x = _x;
		y = _y;
		z = _z;
	}
	public Point() {
    }
	public double getDistance(Point dest) {
		return Math.sqrt((this.x - dest.x) * (x - dest.x)
				+ (y - dest.y) * (y - dest.y)
				+ (z - dest.z) * (z - dest.z));
				
	}
}
class TestPoint{
	public static void main(String[] args) {
		Point origin = new Point();
		Point dest = new Point(1.0, 2.0, 3.0);
		System.out.println(dest.getDistance(origin));
	}
}
